Expose disabled HK strategy profiles - #121
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3fd65d7b9d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if not is_market_open_today( | ||
| calendar_name=MARKET_CALENDAR, | ||
| timezone_name=MARKET_TIMEZONE, | ||
| logger=lambda message: print(message, flush=True), | ||
| ): |
There was a problem hiding this comment.
Preserve zero-arg market-open test doubles
With this call now always passing keyword arguments, the existing request-handling tests that monkeypatch main.is_market_open_today with zero-argument lambdas (for example in tests/test_request_handling.py) will raise TypeError before they reach the assertions. Either update those test doubles to accept **kwargs or wrap the call so the suite can still exercise the handler paths.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 52c280c919
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
| ) | ||
| continue | ||
| positions.append( |
There was a problem hiding this comment.
Filter positions to the configured market currency
When a selected account also holds a position whose contract.currency differs from MARKET_CURRENCY (for example USD AAPL in an HKD account), this still adds it to the portfolio snapshot. get_current_portfolio then feeds every snapshot position into rebalancing, while the new quote/order wrappers force all contracts to the configured MARKET_EXCHANGE/MARKET_CURRENCY, so the runner can try to quote or submit an invalid HKD/SEHK order for a USD symbol. Since account values are already filtered by market_currency, skip or separately quarantine non-market-currency positions here.
Useful? React with 👍 / 👎.
Summary
hk_listed_global_etf_rotationafter the HK strategy package added the research candidateHkEquityStrategiesto the new commitSafety
STRATEGY_PROFILEremains rejected for HK research candidatesValidation
PYTHONPATH=/Users/lisiyi/Projects/HkEquityStrategies/src:/tmp/qsl-hk-test-venv/lib/python3.12/site-packages:/Users/lisiyi/Projects/QuantPlatformKit/src /tmp/qsl-hk-test-venv/bin/python -m pytest tests/test_runtime_config_support.py -q -k 'not print_strategy_profile_status_json and not print_strategy_switch_env_plan and not build_cloud_run_env_sync_plan'-> 52 passed, 12 deselectedbash tests/test_sync_cloud_run_env_workflow.shPYTHONPATH=/Users/lisiyi/Projects/HkEquityStrategies/src:/tmp/qsl-hk-test-venv/lib/python3.12/site-packages:/Users/lisiyi/Projects/QuantPlatformKit/src /tmp/qsl-hk-test-venv/bin/python -m compileall -q . && git diff --checkKnown local limitation: full subprocess-based strategy status/env-sync tests are affected by sibling
UsEquityStrategies/srcpath precedence on this machine; the targeted non-subprocess/runtime checks above passed.